import config from "@/utils/config.js"

//获取实时任务
const onTimeTask = async (token) => {
	let url = config.baseUrl + "wx/driver/realtimetask";
	let param = {
		token: token,
	}
	let res = await config.getData(url, param);
	return res;
}

//司机签到
const driverSign = async (obj) => {
	let url = config.baseUrl + "wx/driver/sign";
	let param = {
		id: obj.id,
		stationId: obj.stationId,
		taskId: obj.taskId,
		token: obj.token,
		type: obj.type,
		lat: obj.lat,
		lon: obj.lon,
	}
	let res = await config.getData(url, param);
	return res;
}

export default {
	onTimeTask,
	driverSign
}